home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Linux Cubed Series 7: Sunsite
/
Linux Cubed Series 7 - Sunsite Vol 1.iso
/
system
/
shells
/
scsh-0.4
/
scsh-0
/
scsh-0.4.2
/
rts
/
signal.scm
< prev
next >
Wrap
Text File
|
1995-10-13
|
1KB
|
36 lines
; Copyright (c) 1993, 1994 Richard Kelsey and Jonathan Rees. See file COPYING.
;;;; Signalling conditions
; I don't like the term "signal," but that's the one Gnu Emacs Lisp,
; Common Lisp, and Dylan use, so it's probably best to stick with it.
(define make-condition cons)
(define (signal type . stuff)
(signal-condition (make-condition type stuff)))
; Warn
(define (warn message . irritants)
(signal-condition (make-condition 'warning (cons message irritants))))
; Syntax errors
(define (syntax-error . rest) ; Must return a valid expression.
(signal-condition (make-condition 'syntax-error rest))
''syntax-error)
; "Call error" - this means that the condition's "stuff" (cdr) is of
; the form (message procedure . args), and should be displayed appropriately.
; Proceeding from such an error should return the value that the call
; to the procedure on the args should have returned.
(define (call-error message proc . args)
(signal-condition (make-condition 'call-error
(cons message (cons proc args)))))